<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <h:outputStylesheet library="css" name="default.css" />
        <h:outputStylesheet library="css" name="cssLayout.css" />
        <h:outputStylesheet library="css" name="table.css" />
        <h:outputScript library="js" name="utils.js" />
        <title>JIMDB</title>
    </h:head>

    <h:body>

        <div id="top">
            <ui:insert name="top">
                <div class="title"><h1>JIMDB</h1></div>
                <div class="logoff">
                    <c:if test="#{userController.authenticatedUser!=null}">
                        <h:form>
                            <h:commandLink action="#{userController.logout}" value="logoff" />
                        </h:form>
                    </c:if>
                </div>
            </ui:insert>
        </div>
        <div>
            <div id="left">
                <ui:insert name="left">
                    <h:link outcome="/impressum" value="Impressum" /><br/>
                    <h:link rendered="#{searchController.authenticatedUser!=null}" outcome="/secured/index" value="Search" /><br/>
                    <h:link rendered="#{searchController.authenticatedUser!=null}" outcome="/secured/movies/List" value="My Movies" /><br/>
                    <h:link rendered="#{searchController.isUserInRole('admin')}" outcome="/secured/status/List" value="Status Manager"/><br/>
                    <h:link rendered="#{searchController.isUserInRole('admin')}" outcome="/secured/user/List" value="User Manager"/><br/>
                    <h:link rendered="#{searchController.isUserInRole('admin')}" outcome="/secured/accesslog/List" value="AccessLog"/><br/>


                </ui:insert>
            </div>
            <div id="content" class="left_content">
                <ui:insert name="content"></ui:insert>
            </div>
        </div>
        <div id="bottom">
            <ui:insert name="bottom">jh 2011</ui:insert>
        </div>

    </h:body>

</html>
